<div id="photo" align="center">
<h2><%= @photo.title.to_s %></h2>
<%= image = image_tag(@photo.to_url(:large), :class=>"photo", :id=>"photo_#{@photo.id}", :title=>@photo.title) %>
<br>
<small>This photo is copyrighted by the photographer and may not be used without permission.</small>
</div>

<div id="photo-profile" class="subsection">
  <h2>Photo</h2>
  <table border="0" cellpadding="0" cellspacing="0">
    <tr valign="top">
      <td class="row_header">Title</td>
      <td class="row_value"><%= @photo.title %></td>
    </tr>
    <tr valign="top">
      <td class="row_header">Photographer</td>
      <td class="row_value"><%= @photo.user.full_name %></td>
    </tr>
    <tr valign="top">
      <td class="row_header">Submitted at</td>
      <td class="row_value"><%= @photo.created_at.to_s(:long) %>
                            <% if @photo.created_at > 24.hours.ago -%>
                              <%= $new_img %>
                            <% end -%>
      </td>
    </tr>
    <tr valign="top">
      <td class="row_header">Camera</td>
      <td class="row_value"><%= @photo.camera %></td>
    </tr>
    <tr valign="top">
      <td class="row_header">Lens</td>
      <td class="row_value"><%= @photo.lens %></td>
    </tr>
    <tr valign="top">
      <td class="row_header">Views</td>
      <td class="row_value"><%= @photo.views %></td>
    </tr>
    <tr valign="top">
      <td class="row_header">Rating</td>
      <td class="row_value">
        <%= @photo.get_rate %>
        <% up_rate = @photo.get_up_rate %>
        <% down_rate = @photo.get_down_rate %>
        <% if up_rate != 0 or down_rate != 0%>
        &nbsp;(&nbsp;<%= up_rate %>&nbsp;<%= $up_img %>&nbsp;&nbsp;&nbsp;&nbsp;<%= down_rate %>&nbsp;<%= $down_img %>&nbsp;)</td>
        <% end%>
    </tr>
  </table>
  <p><%= @photo.description %></p>
</div>
